package com.secsys.action;

import java.text.DecimalFormat;
import java.util.Calendar;
import java.util.List;

import org.apache.log4j.Logger;

import com.opensymphony.xwork2.ActionSupport;
import com.secsys.dto.StoCapitalizationDTO;
import com.secsys.dto.StoFinanceassetdebtDTO;
import com.secsys.dto.StoFinanceperstockDTO;
import com.secsys.dto.StoFinanceprofitDTO;
import com.secsys.dto.StoStockDTO;
import com.secsys.dto.StoStockdailyDTO;
import com.secsys.dto.StockPageDto;
import com.secsys.service.impl.StoCapitalizationServiceImpl;
import com.secsys.service.impl.StoFinanceAssetDebtServiceImpl;
import com.secsys.service.impl.StoFinancePerStockServiceImpl;
import com.secsys.service.impl.StoFinanceProfitServiceImpl;
import com.secsys.service.impl.StoStockServiceImpl;
import com.secsys.service.impl.StoStockdailyServiceImpl;

public class StocksAction extends BaseAction<StockPageDto>{

	private StoStockDTO stockDto;
	
	private StoFinanceassetdebtDTO  assetDto;
	
	private StoCapitalizationDTO  capitalizationDto;
	
	private StoStockdailyDTO stockdailyDto;
	
	private StoFinanceperstockDTO stoFinanceperstockDto;
	
	private StoFinanceprofitDTO stoFinanceprofitDTO;
	
	private StockPageDto stockPageDto;
	
	private String stockCode;
	
	private StoStockServiceImpl stoStockService;
	
	private StoFinanceAssetDebtServiceImpl stoFinanceAssetDebtService;
	
	private StoCapitalizationServiceImpl stoCapitalizationService;
	
	private StoStockdailyServiceImpl  stoStockdailyService;
	
	private StoFinancePerStockServiceImpl stoFinancePerStockService;
	
	private StoFinanceProfitServiceImpl stoFinanceProfitService;
	
	private final static Logger logger = Logger.getLogger(StocksAction.class);
	
	private String errorMessage;
	
	private List stockList;
	
	@Override
	public StockPageDto getModel() {
		// TODO Auto-generated method stub
		if(stockPageDto==null){
			stockPageDto = new StockPageDto();
		}
		return stockPageDto;
	}
	
	public String searchStock(){
		if("".equals(stockCode) || stockCode==null){	
			errorMessage = "请输入股票代码!";
			return "input";
		}else if(stockCode.matches("\\d{6}")){//匹配输入的是否为6位的纯数字
		try {
			DecimalFormat dcmFmt = new DecimalFormat("0.00");//定义格式的double类型
			Calendar c = Calendar.getInstance();//定义日期
			stockDto = stoStockService.findByStockCode(stockCode);//查找股票信息
			List<StoFinanceprofitDTO>  stoFinanceprofitDTOList = stoFinanceProfitService.queryStoFinanceprofitByStockCode(stockCode);
			double netProfit = 0.0;
			StoFinanceprofitDTO stoFinanceprofitDTO2010 = null;
			StoFinanceprofitDTO stoFinanceprofitDTO2009 = null;
			StoFinanceassetdebtDTO stoFinanceassetdebtDTO2010 = null ;
			StoFinanceassetdebtDTO stoFinanceassetdebtDTO2009 = null ;
			if(stoFinanceprofitDTOList!=null && stoFinanceprofitDTOList.size()>0){
				stoFinanceprofitDTO = stoFinanceprofitDTOList.get(0);
				netProfit =  stoFinanceprofitDTO.getNetGain()/stoFinanceprofitDTO.getMainIncome();//销售净利率
				stockPageDto.setNetProfit(dcmFmt.format(netProfit));
				for(StoFinanceprofitDTO stoFinanceprofitDTOTest : stoFinanceprofitDTOList){
					c.setTime(stoFinanceprofitDTOTest.getFieldDate());
					if(c.get(Calendar.YEAR)==2010){
						stoFinanceprofitDTO2010 = stoFinanceprofitDTOTest;
					}
					if(c.get(Calendar.YEAR)==2009){
						stoFinanceprofitDTO2009 = stoFinanceprofitDTOTest;
					}
				}
			}
			List<StoFinanceassetdebtDTO> assetList = stoFinanceAssetDebtService.queryAssetdebtListByStockCode(stockCode);
			if(assetList!=null && assetList.size()>0){
				for(StoFinanceassetdebtDTO assetTest : assetList){
					c.setTime(assetTest.getFieldDate());
					if(c.get(Calendar.YEAR)==2010){
						stoFinanceassetdebtDTO2010 = assetTest;
					}
					if(c.get(Calendar.YEAR)==2009){
						stoFinanceassetdebtDTO2009 = assetTest;
					}
				}
			}
			if(stoFinanceprofitDTO2010 !=null && stoFinanceprofitDTO2009 !=null && stoFinanceassetdebtDTO2010!=null && stoFinanceassetdebtDTO2009!=null){
				System.out.println(stoFinanceprofitDTO2010);
				System.out.println(stoFinanceprofitDTO2009);
				System.out.println(stoFinanceassetdebtDTO2010);
				System.out.println(stoFinanceassetdebtDTO2009);
				stockPageDto.setMainIncome2010(stoFinanceprofitDTO2010.getMainIncome());//2010营业收入
				stockPageDto.setMainIncome2009(stoFinanceprofitDTO2009.getMainIncome());//2009营业收入
				double mainIncomeRate = stoFinanceprofitDTO2010.getMainIncome()/stoFinanceprofitDTO2009.getMainIncome();//营业收入增长比
				stockPageDto.setMainIncomeRate(dcmFmt.format(mainIncomeRate));
				
				double netProfit2010 = stoFinanceprofitDTO2010.getNetGain()/stoFinanceprofitDTO2010.getMainIncome();//2010销售净利率
				double netProfit2009 = stoFinanceprofitDTO2009.getNetGain()/stoFinanceprofitDTO2009.getMainIncome();//2009销售净利率
				double netProfitRate = netProfit2010 / netProfit2009;//销售净利率增长比
				stockPageDto.setNetProfit2010(dcmFmt.format(netProfit2010));
				stockPageDto.setNetProfit2009(dcmFmt.format(netProfit2009));
				stockPageDto.setNetProfitRate(dcmFmt.format(netProfitRate));
				
				double assetLiab2010 = stoFinanceassetdebtDTO2010.getTotalIndebted()/stoFinanceassetdebtDTO2010.getTotalAsset();//2010资产负债率
				double assetLiab2009 = stoFinanceassetdebtDTO2009.getTotalIndebted()/stoFinanceassetdebtDTO2009.getTotalAsset();//2009资产负债率
				double assetLiabRate = assetLiab2010 / assetLiab2009;//资产负债率增长比
				stockPageDto.setAssetLiab2010(dcmFmt.format(assetLiab2010));
				stockPageDto.setAssetLiab2009(dcmFmt.format(assetLiab2009));
				stockPageDto.setAssetLiabRate(dcmFmt.format(assetLiabRate));
				
				stockPageDto.setNetGain2010(stoFinanceprofitDTO2010.getNetGain());//2010净利润
				stockPageDto.setNetGain2009(stoFinanceprofitDTO2009.getNetGain());//2009净利润
				double netGainRate = stoFinanceprofitDTO2010.getNetGain() / stoFinanceprofitDTO2009.getNetGain();//净利润增长比
				stockPageDto.setNetGainRate(dcmFmt.format(netGainRate));
				double grossPrift2010 =0;
				if (stoFinanceprofitDTO2010.getMainIncome()!=null && stoFinanceprofitDTO2010.getMainIncome()!=0 && stoFinanceprofitDTO2010.getMainProfit()!=0) {
					grossPrift2010=stoFinanceprofitDTO2010.getMainProfit()/stoFinanceprofitDTO2010.getMainIncome();//2010销售毛利率
				}
				double grossPrift2009 = 0;
				if (stoFinanceprofitDTO2009.getMainIncome()!=null && stoFinanceprofitDTO2009.getMainIncome()!=0 && stoFinanceprofitDTO2009.getMainProfit()!=0) {
					grossPrift2009=stoFinanceprofitDTO2009.getMainProfit()/stoFinanceprofitDTO2009.getMainIncome();//2009销售毛利率
				}
				double grossPriftRate = 0;
				if (grossPrift2009!=0) {
					grossPriftRate=grossPrift2010 / grossPrift2009;//销售毛利率增长比
				}
				stockPageDto.setGrossPrift2010(dcmFmt.format(grossPrift2010));
				stockPageDto.setGrossPrift2009(dcmFmt.format(grossPrift2009)); 
				System.out.println("grossPrift2009="+grossPrift2009+"grossPrift2010="+grossPrift2010);
				if (grossPriftRate!=0) {
					stockPageDto.setGrossPriftRate(dcmFmt.format(grossPriftRate));
				}else {
					stockPageDto.setGrossPriftRate(String.valueOf(0));
				}
				
				stockPageDto.setBusinessFee2010(stoFinanceprofitDTO2010.getBusinessFee());//2010经营费用
				stockPageDto.setBusinessFee2009(stoFinanceprofitDTO2009.getBusinessFee());//2009经营费用				
				double businessFeeRate = stoFinanceprofitDTO2010.getBusinessFee() / stoFinanceprofitDTO2009.getBusinessFee();//经营费用增长比
				stockPageDto.setBusinessFeeRate(dcmFmt.format(businessFeeRate));
				
				stockPageDto.setManageFee2010(stoFinanceprofitDTO2010.getManageFee());//2010管理费用
				stockPageDto.setManageFee2009(stoFinanceprofitDTO2009.getManageFee());//2009管理费用
				double manageFeeRate =0;
				if (stoFinanceprofitDTO2009.getManageFee()!=null && stoFinanceprofitDTO2009.getManageFee()!=0 && stoFinanceprofitDTO2010.getManageFee()!=0) {
					manageFeeRate=stoFinanceprofitDTO2010.getManageFee() / stoFinanceprofitDTO2009.getManageFee();//管理费用增长比
				}
				stockPageDto.setManageFeeRate(dcmFmt.format(manageFeeRate));
				
				stockPageDto.setFinaceFee2010(stoFinanceprofitDTO2010.getFinanceFee());//2010财务费用
				stockPageDto.setFinaceFee2009(stoFinanceprofitDTO2009.getFinanceFee());//2009财务费用
				double finaceFeeRate =0;
				if (stoFinanceprofitDTO2009.getFinanceFee()!=null && stoFinanceprofitDTO2009.getFinanceFee()!=0 && stoFinanceprofitDTO2010.getFinanceFee()!=0) {
					finaceFeeRate=stoFinanceprofitDTO2010.getFinanceFee()/stoFinanceprofitDTO2009.getFinanceFee();//财务费用增长比
				}
				stockPageDto.setFinaceFeeRate(dcmFmt.format(finaceFeeRate));
				
				stockPageDto.setParterProfit2010(stoFinanceassetdebtDTO2010.getPartnerProfit());//2010股东权益
				stockPageDto.setParterProfit2009(stoFinanceassetdebtDTO2009.getPartnerProfit());//2009股东权益
				double parterProfitRate = stoFinanceassetdebtDTO2010.getPartnerProfit() / stoFinanceassetdebtDTO2009.getPartnerProfit();//股东权益同比增长
				stockPageDto.setParterProfitRate(dcmFmt.format(parterProfitRate));
				
				stockPageDto.setAccountReceivable2010(stoFinanceassetdebtDTO2010.getAccountReceivable());//2010应收帐款
				stockPageDto.setAccountReceivable2009(stoFinanceassetdebtDTO2009.getAccountReceivable());//2009应收帐款
				double accountReceivableRate = stoFinanceassetdebtDTO2010.getAccountReceivable() / stoFinanceassetdebtDTO2009.getAccountReceivable();//应收帐款同比增长
				stockPageDto.setAccountReceivableRate(dcmFmt.format(accountReceivableRate));
				
				
				stockPageDto.setTotalAsset2010(stoFinanceassetdebtDTO2010.getTotalAsset());//2010资产总额
				stockPageDto.setTotalAsset2009(stoFinanceassetdebtDTO2009.getTotalAsset());//2009资产总额
				double totalAssetRate = stoFinanceassetdebtDTO2010.getTotalAsset() / stoFinanceassetdebtDTO2009.getTotalAsset();//资产总额同比增长
				stockPageDto.setTotalAssetRate(dcmFmt.format(totalAssetRate));
				
				stockPageDto.setTotalIndebted2010(stoFinanceassetdebtDTO2010.getTotalIndebted());//2010负债总额
				stockPageDto.setTotalIndebted2009(stoFinanceassetdebtDTO2009.getTotalIndebted());//2009负债总额
				double totalIndebtedRate = stoFinanceassetdebtDTO2010.getTotalIndebted() / stoFinanceassetdebtDTO2009.getTotalIndebted();//负债总额同比增长
				stockPageDto.setTotalIndebtedRate(dcmFmt.format(totalIndebtedRate));
				
				double turnAsset2010 = stoFinanceprofitDTO2010.getMainIncome() / stoFinanceassetdebtDTO2010.getTotalAsset();//2010资产周转率
				double turnAsset2009 = stoFinanceprofitDTO2009.getMainIncome() / stoFinanceassetdebtDTO2009.getTotalAsset();//2009资产周转率
				double turnAssetRate = turnAsset2010 / turnAsset2009;//资产周转率增长比
				stockPageDto.setTurnAsset2010(dcmFmt.format(turnAsset2010));
				stockPageDto.setTurnAsset2009(dcmFmt.format(turnAsset2009));
				stockPageDto.setTurnAssetRate(dcmFmt.format(turnAssetRate));
				
				stockPageDto.setCoinFund2010(stoFinanceassetdebtDTO2010.getCoinFund());//2010货币资金
				stockPageDto.setCoinFund2009(stoFinanceassetdebtDTO2009.getCoinFund());//2009货币资金
				double coinFundRate =0;
				if (stoFinanceassetdebtDTO2009.getCoinFund()!=0 && stoFinanceassetdebtDTO2009.getCoinFund()!=null 
						&& stoFinanceassetdebtDTO2010.getCoinFund()!=null) { 
					coinFundRate= stoFinanceassetdebtDTO2010.getCoinFund() / stoFinanceassetdebtDTO2009.getCoinFund();//货币资金同比增长
				}
				stockPageDto.setCoinFundRate(dcmFmt.format(coinFundRate));
				
				
				
				double netAssetIncome2010 =  netProfit2010 * turnAsset2010 * (stoFinanceprofitDTO2010.getMainIncome()/stoFinanceassetdebtDTO2010.getTotalAsset());//2010净资产收益率
				double netAssetIncome2009 =  netProfit2009 * turnAsset2009 * (stoFinanceprofitDTO2009.getMainIncome()/stoFinanceassetdebtDTO2009.getTotalAsset());//2009净资产收益率
				double netAssetIncomeRate = netAssetIncome2010 / netAssetIncome2009;//净资产收益率增长比
				stockPageDto.setNetAssetIncome2010(dcmFmt.format(netAssetIncome2010));
				stockPageDto.setNetAssetIncome2009(dcmFmt.format(netAssetIncome2009));
				stockPageDto.setNetAssetIncomeRate(dcmFmt.format(netAssetIncomeRate));
				
				
			}
			assetDto = stoFinanceAssetDebtService.queryFinanceassetdebtByStockCode(stockCode);//查找资产与负责信息
			if(assetDto!=null){
				double assetLiab = assetDto.getTotalIndebted()/assetDto.getTotalAsset();//资产负债率
				stockPageDto.setAssetLiab(dcmFmt.format(assetLiab));
				double equityM = 1/(1-assetLiab);//权益乘数
				stockPageDto.setEquityM(dcmFmt.format(equityM));
				if(stoFinanceprofitDTO!=null){
					double turnAsset = stoFinanceprofitDTO.getMainIncome()/assetDto.getTotalAsset();//资产周转率
					stockPageDto.setTurnAsset(dcmFmt.format(turnAsset));
					double netAssetIncome = netProfit * turnAsset * equityM;//净资产收益率
					stockPageDto.setNetAssetIncome(dcmFmt.format(netAssetIncome));
				}
				
			}
			List<StoCapitalizationDTO> capitalizationDtoList = stoCapitalizationService.queryStoStockdailyByStockCode(Integer.parseInt(stockCode));
			List<StoStockdailyDTO>  dailyList = stoStockdailyService.queryStoStockdailyByStockCode(stockCode,0,120);
			List<StoFinanceperstockDTO> stoFinanceperstockDTOList = stoFinancePerStockService.queryStoFinancePerStockByStockCode(stockCode);
			
			
			
			if(dailyList!=null && dailyList.size()>0){
				stockdailyDto = dailyList.get(0);
			}
			if(capitalizationDtoList!=null && capitalizationDtoList.size()>0){
				capitalizationDto = capitalizationDtoList.get(0);	
				
			}
			if(stoFinanceperstockDTOList.size()>0){
				stoFinanceperstockDto = stoFinanceperstockDTOList.get(0);
				for(StoFinanceperstockDTO stoFinanceperstockTest: stoFinanceperstockDTOList){
					c.setTime(stoFinanceperstockTest.getFieldDate());
					if(c.get(Calendar.YEAR)==2010){//2010年现金净流量
						stockPageDto.setPerCash2010(stoFinanceperstockTest.getPerCash());
					}
					if(c.get(Calendar.YEAR)==2009){//2009年现金净流量
						stockPageDto.setPerCash2009(stoFinanceperstockTest.getPerCash());
					}
				}
				if(stockPageDto!=null && stockPageDto.getPerCash2010()!=null && stockPageDto.getPerCash2009()!=null){
					double perCashRate = stockPageDto.getPerCash2010()/stockPageDto.getPerCash2009();//现金净流量同比增长
					stockPageDto.setPerCashRate(dcmFmt.format(perCashRate));
				}
				
			}
			if(stockdailyDto!=null && capitalizationDto!=null && stoFinanceperstockDto!=null ){
				double totalValue = capitalizationDto.getTotalCaptial() * stockdailyDto.getEndPrice();//计算总市值
				stockPageDto.setTotalValue(dcmFmt.format(totalValue));
				double currentMarketPrice = capitalizationDto.getCirculateA() * stockdailyDto.getEndPrice();//计算流通市值
				stockPageDto.setCurrentMarketPrice(dcmFmt.format(currentMarketPrice));
				double pbValue = stockdailyDto.getEndPrice() / stoFinanceperstockDto.getPerNetAsset();//计算市净率
				stockPageDto.setPbValue(dcmFmt.format(pbValue));
				double currentPrice = stockdailyDto.getEndPrice();//当前股价
				if(dailyList!=null && dailyList.size()>5){//5日涨跌
					double oldPrice = dailyList.get(4).getEndPrice();
					double fiveDrop;
					if(currentPrice < oldPrice){//跌
						fiveDrop = (oldPrice - currentPrice)/oldPrice;
						stockPageDto.setFiveDropStatue(0);
					}else{//涨
						fiveDrop = (currentPrice - oldPrice)/oldPrice;	
						stockPageDto.setFiveDropStatue(1);
					}
					stockPageDto.setFiveDrop(dcmFmt.format(fiveDrop));
				}
				if(dailyList!=null && dailyList.size()>=10){//10日涨跌
					double oldPrice = dailyList.get(9).getEndPrice();
					double tenDrop;
					if(currentPrice < oldPrice){//跌
						tenDrop = (oldPrice - currentPrice)/oldPrice;
						stockPageDto.setTenDropStatue(0);
					}else{//涨
						tenDrop = (currentPrice - oldPrice)/oldPrice;	
						stockPageDto.setTenDropStatue(1);
					}
					stockPageDto.setTenDrop(dcmFmt.format(tenDrop));
				}
				if(dailyList!=null && dailyList.size()>=20){//20日涨跌
					double oldPrice = dailyList.get(19).getEndPrice();
					double twentyDrop;
					if(currentPrice < oldPrice){//跌
						twentyDrop = (oldPrice - currentPrice)/oldPrice;
						stockPageDto.setTwentyDropStatue(0);
					}else{//涨
						twentyDrop = (currentPrice - oldPrice)/oldPrice;	
						stockPageDto.setTwentyDropStatue(1);
					}
					stockPageDto.setTwentyDrop(dcmFmt.format(twentyDrop));
				}
				if(dailyList!=null && dailyList.size()>=60){//60日涨跌
					double oldPrice = dailyList.get(59).getEndPrice();
					double sixtyDrop;
					if(currentPrice < oldPrice){//跌
						sixtyDrop = (oldPrice - currentPrice)/oldPrice;
						stockPageDto.setSixtyDropStatue(0);
					}else{//涨
						sixtyDrop = (currentPrice - oldPrice)/oldPrice;	
						stockPageDto.setSixtyDropStatue(1);
					}
					stockPageDto.setSixtyDrop(dcmFmt.format(sixtyDrop));
				}
				if(dailyList!=null && dailyList.size()>=120){//120日涨跌
					double oldPrice = dailyList.get(19).getEndPrice();
					double hundredTwentyDrop;
					if(currentPrice < oldPrice){//跌
						hundredTwentyDrop = (oldPrice - currentPrice)/oldPrice;
						stockPageDto.setHundredTwentyDropStatue(0);
					}else{//涨
						hundredTwentyDrop = (currentPrice - oldPrice)/oldPrice;	
						stockPageDto.setHundredTwentyDropStatue(1);
					}
					stockPageDto.setHundredTwentyDrop(dcmFmt.format(hundredTwentyDrop));
				}
				
			}
			
			
			return "searchStock";
		} catch (Exception e) {
			e.printStackTrace();
			errorMessage = "数据库暂时没有此数据,请稍后查看!";
			return "input";
		}
		}else{
			errorMessage = "您输入的是："+ stockCode + "请输入正确的股票代码!";
			return "input";
		}
	}

	public String getStockCode() {
		return stockCode;
	}

	public void setStockCode(String stockCode) {
		this.stockCode = stockCode;
	}

	public List getStockList() {
		return stockList;
	}

	public void setStockList(List stockList) {
		this.stockList = stockList;
	}


	public StoStockDTO getStockDto() {
		return stockDto;
	}

	public void setStockDto(StoStockDTO stockDto) {
		this.stockDto = stockDto;
	}

	public StoStockServiceImpl getStoStockService() {
		return stoStockService;
	}

	public void setStoStockService(StoStockServiceImpl stoStockService) {
		this.stoStockService = stoStockService;
	}

	public StoFinanceassetdebtDTO getAssetDto() {
		return assetDto;
	}

	public void setAssetDto(StoFinanceassetdebtDTO assetDto) {
		this.assetDto = assetDto;
	}

	public StoFinanceAssetDebtServiceImpl getStoFinanceAssetDebtService() {
		return stoFinanceAssetDebtService;
	}

	public void setStoFinanceAssetDebtService(
			StoFinanceAssetDebtServiceImpl stoFinanceAssetDebtService) {
		this.stoFinanceAssetDebtService = stoFinanceAssetDebtService;
	}

	public StoCapitalizationDTO getCapitalizationDto() {
		return capitalizationDto;
	}

	public void setCapitalizationDto(StoCapitalizationDTO capitalizationDto) {
		this.capitalizationDto = capitalizationDto;
	}

	public StoCapitalizationServiceImpl getStoCapitalizationService() {
		return stoCapitalizationService;
	}

	public void setStoCapitalizationService(
			StoCapitalizationServiceImpl stoCapitalizationService) {
		this.stoCapitalizationService = stoCapitalizationService;
	}

	public StoStockdailyDTO getStockdailyDto() {
		return stockdailyDto;
	}

	public void setStockdailyDto(StoStockdailyDTO stockdailyDto) {
		this.stockdailyDto = stockdailyDto;
	}

	public StoStockdailyServiceImpl getStoStockdailyService() {
		return stoStockdailyService;
	}

	public void setStoStockdailyService(
			StoStockdailyServiceImpl stoStockdailyService) {
		this.stoStockdailyService = stoStockdailyService;
	}

	public StoFinanceperstockDTO getStoFinanceperstockDto() {
		return stoFinanceperstockDto;
	}

	public void setStoFinanceperstockDto(StoFinanceperstockDTO stoFinanceperstockDto) {
		this.stoFinanceperstockDto = stoFinanceperstockDto;
	}

	public StoFinancePerStockServiceImpl getStoFinancePerStockService() {
		return stoFinancePerStockService;
	}

	public void setStoFinancePerStockService(
			StoFinancePerStockServiceImpl stoFinancePerStockService) {
		this.stoFinancePerStockService = stoFinancePerStockService;
	}

	public StoFinanceprofitDTO getStoFinanceprofitDTO() {
		return stoFinanceprofitDTO;
	}

	public void setStoFinanceprofitDTO(StoFinanceprofitDTO stoFinanceprofitDTO) {
		this.stoFinanceprofitDTO = stoFinanceprofitDTO;
	}

	public StoFinanceProfitServiceImpl getStoFinanceProfitService() {
		return stoFinanceProfitService;
	}

	public void setStoFinanceProfitService(
			StoFinanceProfitServiceImpl stoFinanceProfitService) {
		this.stoFinanceProfitService = stoFinanceProfitService;
	}

	public String getErrorMessage() {
		return errorMessage;
	}

	public void setErrorMessage(String errorMessage) {
		this.errorMessage = errorMessage;
	}

	public StockPageDto getStockPageDto() {
		return stockPageDto;
	}

	public void setStockPageDto(StockPageDto stockPageDto) {
		this.stockPageDto = stockPageDto;
	}

	

	
}
